﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Carbon.Web.Forms
{
    public interface IPersistanceService : IDisposable
    {
        // Id parameter can't contain ';'
        byte[] LoadBinaryData(Object id, Guid key);

        // Returns store identifier
        Object StoreBinaryData(Guid key, byte[] data);

        void UpdateBinaryData(Object id, Guid key, byte[] data);
        
        void FreeIdentifier(Object id, Guid key);

        FileReference StoreFile(Guid key, String name, byte[] content);
        byte[] LoadFile(FileReference reference);
        void FreeFile(FileReference reference);
    }
}
